<?php include('post-safe.php');?><!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Cache-Control" content="no-transform"/>
<meta http-equiv="Cache-Control" content="no-siteapp"/>
<meta name="applicable-device" content="pc,mobile"/>
<meta name="renderer" content="webkit"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1"/>
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=no"/>
{php}
if($zbp->Config('aymFreeFour')->seoON == '1'){
	if($zbp->Config('aymFreeFour')->separator){
		$separator = $zbp->Config('aymFreeFour')->separator;
	}else{
		$separator = '_';
	}
	if($type == 'index'){
		if($page == '1'){
			if($zbp->Config('aymFreeFour')->title){
				$topTitle = $zbp->Config('aymFreeFour')->title;
			}else{
				$topTitle = $zbp->name.$separator.$zbp->subname;
			}
		}else{
			if($zbp->Config('aymFreeFour')->title){
				$topTitle = $zbp->Config('aymFreeFour')->title.$separator.'第'.$page.'页'.$separator.$zbp->subname;
			}else{
				$topTitle = $zbp->name.$separator.'第'.$page.'页'.$separator.$zbp->subname;
			}
		}
		if($zbp->Config('aymFreeFour')->keywords){
			$keywords = $zbp->Config('aymFreeFour')->keywords;
		}else{
			$keywords = '';
		}
		if($zbp->Config('aymFreeFour')->description){
			$description = $zbp->Config('aymFreeFour')->description;
		}else{
			$description = '';
		}
	}elseif($type == 'category'){
		if($category->Metas->catetitle){
			if ($page=='1') {
				$topTitle = $category->Metas->catetitle.$separator.$zbp->name;
			} else {
				$topTitle = $category->Metas->catetitle.'第'.$page.'页'.$separator.$zbp->name;
			}
		}else{
			$topTitle = $zbp->title.$separator.$zbp->name;
		}
		if($category->Metas->catekeywords){
			$keywords = $category->Metas->catekeywords;
		}else{
			$keywords = $category->Name;
		}
		if($category->Metas->catedescription){
			$description = $category->Metas->catedescription;
		}else{
			$description = $category->Intro;
		}		
	}elseif($type == 'tag'){
		if($tag->Metas->tagtitle){
			if ($page=='1') {
				$topTitle = $tag->Metas->tagtitle.$separator.$zbp->name;
			} else {
				$topTitle = $tag->Metas->tagtitle.$separator.'第'.$page.'页'.$separator.$zbp->name;
			}
		}else{
			$topTitle = $zbp->title.$separator.$zbp->name;
		}
		if($tag->Metas->tagkeywords){
			$keywords = $tag->Metas->tagkeywords;
		}else{
			$keywords = $tag->Name;
		}
		if($tag->Metas->tagdescription){
			$description = $tag->Metas->tagdescription;
		}else{
			$description = $tag->Intro;
		}
	}elseif($type == 'article'){
		if($article->Metas->title){
			$topTitle = $article->Metas->title.$separator.$zbp->name;
		}else{
			$topTitle = $article->Title.$separator.$zbp->name;
		}
		if($article->Metas->keywords){
			$keywords = $article->Metas->keywords;
		}else{
			$aryTags = array();
			foreach($article->Tags as $key){
				$aryTags[] = $key->Name;
			}
			if(count($aryTags)>0){
				$keywords = implode(',',$aryTags);
			} else {
				$keywords = '';
			}
		}
		if($article->Metas->description){
			$description = $article->Metas->description;
		}else{
			$description = aymFreeFour_intro($article,1,80,'');
		}		
	}elseif($type == 'page'){
		if($article->Metas->title){
			$topTitle = $article->Metas->title.$separator.$zbp->name;
		}else{
			$topTitle = $article->Title.$separator.$zbp->name;
		}
		if($article->Metas->keywords){
			$keywords = $article->Metas->keywords;
		}else{
			$keywords = '';
		}	
        if($article->Metas->description){
			$description = $article->Metas->description;
		}else{
			$description = aymFreeFour_intro($article,1,80,'');
		}		
	}else{
		$topTitle = $zbp->title.$separator.$zbp->name;
		if($zbp->Config('aymFreeFour')->keywords){
			$keywords = $zbp->Config('aymFreeFour')->keywords;
		}else{
			$keywords = '';
		}
		if($zbp->Config('aymFreeFour')->description){
			$description = $zbp->Config('aymFreeFour')->description;
		}else{
			$description = '';
		}
	}
}else{
	$topTitle = $name.'-'.$title;
}
{/php}
<title>{$name}-{$title}</title>
{if $zbp->Config('aymFreeFour')->seoON == '1'}
<meta name="keywords" content="{$keywords}"/>
<meta name="description" content="{$description}"/>
{/if}
<link rel="stylesheet" type="text/css" href="{$host}zb_users/theme/{$theme}/style/{$style}.css" media="screen"/>
<script src="{$host}zb_system/script/jquery-2.2.4.min.js"></script>
<script src="{$host}zb_system/script/zblogphp.js"></script>
<script src="{$host}zb_system/script/c_html_js_add.php"></script>
<!--[if lt IE 9]>
<script type="text/javascript" src="{$host}zb_users/theme/{$theme}/script/html5-css3.js"></script>
<![endif]-->
{$header}
{if $type == 'index' && $page == '1'}
<link rel="alternate" type="application/rss+xml" href="{$feedurl}" title="{$name}" />
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="{$host}zb_system/xml-rpc/?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="{$host}zb_system/xml-rpc/wlwmanifest.xml" />
{/if}
</head>
<body>
<header class="header">
	<div class="inner">
		{if $type == 'article' || $type == 'page'}
		<div class="website">
			<a href="{$host}" title="{$name}">{$name}</a>
		</div>
		{else}
		<h1 class="website">
			<a href="{$host}" title="{$name}">{$name}</a>
		</h1>
		{/if}
		<div class="mobile">
			<div class="btn">
				<i></i>
				<i></i>
				<i></i>
			</div>
			展开菜单
		</div>
		<nav id="nav">
			<ul>
				{module:navbar}
			</ul>
		</nav>
		<div class="clear"></div>
	</div>
</header>

<div class="inner breadcrumb">
	<a href="{$host}" title="{$name}" class="home">首页</a> 
	{if $type == 'index'}
	 &gt; {$subname}
	{elseif $type == 'category'}
	{aymFreeFour_breadcrumb($category->ID)}
	{elseif $type =="article"}
	{aymFreeFour_breadcrumb($article->Category->ID)}
	{else}
	 &gt; {$title}	
	{/if}
</div>